// 封装本地存储的三种方法
// localStorage.setItem(key, value) // 往localStorage存值
// localStorage.getItem(key) // 往localStorage取值
// localStorage.removeItem(key)// localStorage删除值

// 存储key
export const key = "MY-HM-MJ-TOKEN";

// 存储值
export const setItem = (key, value) => {
  localStorage.setItem(key, JSON.stringify(value));
};

// 取值
export const getItem = (key) => {
  return JSON.parse(localStorage.getItem(key));
};

// 删除值                                                                              
export const delItem = (key) => {
  localStorage.removeItem(key);
};
